package com.zgxt.demo.service.impl;



import com.zgxt.demo.entity.UpdateLog;
import com.zgxt.demo.mapper.UpdateLogMapper;
import com.zgxt.demo.service.UpdateLogService;
import com.zgxt.demo.util.Conversion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UpdateLogServiceImpl implements UpdateLogService {

    //时间类
    Conversion conversion=new Conversion();

    @Autowired
    UpdateLogMapper updateLogMapper;


    @Override
    public List<UpdateLog> UpdateLogList() {
        return updateLogMapper.UpdateLogList();
    }

    @Override
    public Integer addUpdateLog(String logTitle, String logData, String logVersion) {
        return updateLogMapper.addUpdateLog(logTitle,logData,logVersion,conversion.Time());
    }

    @Override
    public Integer deletelog(String ids) {
        return updateLogMapper.deletelog(ids.split(","),conversion.Time());
    }

    @Override
    public Integer updateLog(Integer id,String logTitle, String logData, String logVersion) {
        return updateLogMapper.updateLog(id,logTitle,logData,logVersion, conversion.Time());
    }
}
